﻿<%@ Page Language="C#" MasterPageFile="~/SubForm.Master" AutoEventWireup="true" Codebehind="BGManagement.aspx.cs"
    Inherits="PreContractWeb.Administration.BGManagement" Title="BGManagement Page"
    EnableEventValidation="false" %>

<%@ Register Src="../UserControl/Pager.ascx" TagName="Pager" TagPrefix="uc1" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="divError" runat="server" visible="false">
    </div>
    <div id="divConnect" runat="server">
        <asp:ScriptManager id="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel id="UpdatePanel1" runat="server">
            <contenttemplate>
<SCRIPT language="javascript" type="text/javascript">
	  
   function ShowPage(id)
   {
    var arg = null;
  
     var top=(screen.height-310)/2;
     var left=(screen.width-800)/2;
     
     arg =  window.showModalDialog('EditBG.aspx?id='+id,'','dialogHeight:310px;dialogWidth:800px;dialogTop:'+top+';dialogLeft:'+left+';center:Yes;scroll:no;hidden;resizable:no;status:no;');
   
     if(arg != null)
     {
		document.getElementById('<%=returnvalue.ClientID%>').value   = arg[0];
     }
  }
  
   window.attachEvent("onresize",resizeFunc); 
    resizeFunc();
                </SCRIPT>
<DIV style="OVERFLOW: auto; TEXT-ALIGN: center" id="ctl00_ContentPlaceHolder1_divReport"><INPUT id="returnvalue" type=hidden name="returnvalue" runat="server" /> <DIV style="TEXT-ALIGN: center"><TABLE cellSpacing=0 cellPadding=0 width="95%" border=0><TBODY><TR><TD vAlign=middle align=left height=50><TABLE height=45 cellSpacing=0 cellPadding=0 width="100%" border=0><TBODY><TR><TD align=right height=10><asp:Button id="btnadd" runat="server" CssClass="bgButton" Text="添加(Add)" ToolTip="添加BG">
                                                </asp:Button></TD></TR></TBODY></TABLE></TD></TR><TR><TD vAlign=middle align=center width="100%" height="100%">
                                                
        
<DIV style="OVERFLOW: auto" id="divReport" runat="server">                                                
         <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0><TBODY><TR><TD style="HEIGHT: 100%" vAlign=middle align=right>
            <asp:GridView id="gvBG" runat="server" AutoGenerateColumns="False" DataKeyNames="BGID" OnRowDataBound="gvBG_RowDataBound" PageSize="20" Width="100%">
                <PagerSettings Visible="False"></PagerSettings>
                <Columns>
                <asp:BoundField HtmlEncode="False" DataField="BGCode" HeaderText="编码&lt;br/&gt;Code">
                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundField>
                <asp:BoundField HtmlEncode="False" DataField="SortNumber" HeaderText="排号&lt;br/&gt;SortNumber">
                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundField>
                <asp:CheckBoxField ReadOnly="True" DataField="Active" HeaderText="是否可用&lt;br/&gt;Active">
                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:CheckBoxField>
                <asp:TemplateField HeaderText="编辑&lt;br/&gt;Edit">
                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                <ItemTemplate>
               <asp:ImageButton ID="imgedit" runat="server" ImageUrl="../images/COMEDIT.GIF" ToolTip="编辑BG信息" />
                                                                            
                </ItemTemplate>
                </asp:TemplateField>
                </Columns>

                <RowStyle Height="20px" CssClass="table_row_1"></RowStyle>

                <SelectedRowStyle CssClass="SelectedRow"></SelectedRowStyle>

                <HeaderStyle CssClass="table_header"></HeaderStyle>

                <AlternatingRowStyle CssClass="table_row_2"></AlternatingRowStyle>
            </asp:GridView> &nbsp; 
</TD></TR></TBODY></TABLE>
</DIV>

</contenttemplate>
        </asp:UpdatePanel>
    </div>
    
        <script language="javascript">
    window.attachEvent("onresize",resizeFunc1); 
    resizeFunc1();
    function resizeFunc1()
    {
        var parentWin=window.parent;
        if (parentWin!=null)
        {
            var ofrm=parentWin.document.getElementById("main");
            if (ofrm!=null)
            {
            
                var sHeight=ofrm.document.body.offsetHeight;
                var sWidth=ofrm.document.body.offsetWidth;
                var divReport=document.getElementById("ctl00_ContentPlaceHolder1_divReport");
                if (divReport!=null)
                {
                    divReport.style.width=sWidth-220;
                    divReport.style.height=sHeight-200;
                }
            }
        }
    } 
    </script>
</asp:Content>
